package huanzhao.erp.domain.enumerate.error;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author April
 * 2024/9/22 12:01
 * @version 1.0
 */
@Getter
@AllArgsConstructor
public enum ValidationError implements BaseErrorCode {
    VALIDATION_ERROR(100, "校验失败"),

    USERNAME_VALIDATION_FAILED(110, "用户名校验失败"),
    USERNAME_CONTAINS_SENSITIVE_WORDS(112, "用户名包含敏感词"),
    USERNAME_CONTAINS_SPECIAL_CHARACTERS(113, "用户名包含特殊字符"),

    PASSWORD_VALIDATION_FAILED(120, "密码校验失败"),
    PASSWORD_LENGTH_ILLEGAL(121, "密码长度不合法"),
    PASSWORD_TOO_WEAK(122, "密码强度不够"),
    PASSWORD_ERROR(123, "账号密码不匹配"),
    PASSWORD_ATTEMPTS_EXCEEDED(124, "用户输入密码错误次数超限"),

    VERIFICATION_CODE_NOT_EXIST(130, "校验码未获取"),
    VERIFICATION_CODE_ERROR(131, "校验码输入错误"),
    VERIFICATION_CODE_BLANK(132, "校验码为空"),
    /* SMS_VERIFICATION_CODE_ERROR(132, "短信校验码输入错误"),
            EMAIL_VERIFICATION_CODE_ERROR(133, "邮件校验码输入错误"),
            PIC_VERIFICATION_CODE_ERROR(134, "图片校验码输入错误"),*/
    VERIFICATION_CODE_ATTEMPTS_EXCEEDED(135, "用户验证码尝试次数超限"),

    ID_DOCUMENT_ERROR(140, "用户证件异常"),
    IDENTITY_TYPE_ERROR(141, "身份类型错误"),
    ID_NUMBER_INVALID(142, "身份证编号校验非法"),

    BASIC_INFORMATION_VALIDATION_FAILED(150, "用户基本信息校验失败"),
    PHONE_NUMBER_FORMAT_ERROR(151, "手机格式校验失败"),
    ADDRESS_FORMAT_ERROR(152, "地址格式校验失败"),
    EMAIL_FORMAT_ERROR(153, "邮箱格式校验失败"),

    OPERATION_ERROR(160, "操作校验失败"),

    PARAMETER_ERROR(170, "参数错误");
    private final int code;
    private final String message;
}
